﻿using System;
using System.Collections.Generic;
using Model;

public partial class DattourStep2 : System.Web.UI.Page
{
    public static string _idTour;
    public static ModelVYC11 _khachhangInfo;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            var idTour = Request.QueryString["Id"];
            if (!string.IsNullOrEmpty(idTour))
            {
                _idTour = idTour;
                _khachhangInfo = (ModelVYC11)Session["InfoGuest"];
                var listKh_dattour = (List<ModelVYC12>) Session["ListGuest"];
            }
        }
    }

    protected void btChapnhan_OnClick(object sender, EventArgs e)
    {
        
        if (radiobtChuyenkhoan.Checked)
        {
            // Chuyen khoan
            _khachhangInfo.IdHinhThucThanhToan = 2;            
        }
        else if (radiobtTienmat.Checked)
        {
            // Tien mat
            _khachhangInfo.IdHinhThucThanhToan = 1;
        }
        else if (radiobtTindung.Checked)
        {
            // The tin dung
            _khachhangInfo.IdHinhThucThanhToan = 3;
        }
        else
        {
            litresult.Text = "** Bạn phải chọn hình thức thanh toán";
            return;
        }

        Response.Redirect("~/" + "dattour/" + _idTour + "/khachhang-xacnhan");
    }
}